#include <bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  int n;
  cin>>n;
  int hege = 0;
  int you = 0;
  for(int i = 0;i<n;i++)
  {
    int x;
    cin>>x;
    if(x>=60)
    hege++;
    if(x>=85)
    you++;
  }
  double ret1 = 1.0*hege/n;
  double ret2 = 1.0*you/n;
  string tmp1 = to_string(ret1);
  string tmp2 = to_string(ret2);
  int x = tmp1.find('.');
  int y = tmp2.find('.');
  if(tmp1[x+3]>'4')
  {
    tmp1[x+2]++;
  }
  if(tmp2[y+3]>'4')
  {
    tmp2[y+2]++;
  }
  cout<<tmp1[x+1]<<tmp1[x+2]<<'%'<<endl;
  cout<<tmp2[x+1]<<tmp2[x+2]<<'%'<<endl;
  return 0;
}
